import request from '@/config/axios'

export interface AccountingWorkshopStaffScoreVO {
  id: number
  beginRegisterData: localdate
  endRegisterData: localdate
  jobNumber: string
  staffName: string
  teamCode: string
  teamName: string
  coefficientScore: number
  performanceAssessScore: number
  totalAttendanceSkyNumber: number
  insideFactorySkyNumber: number
  outsideFactorySkyNumber: number
  roadSkyNumber: number
  totalOvertimeHour: number
  insideFactoryOvertimeHour: number
  outsideFactoryOvertimeHour: number
  overtimeSalary: number
  dictStaffType: number
  remark: string
  creatorName: string
  updaterName: string
  updateTime: Date
}

// 查询工资核算 --  车间工资核算 --车间员工考勤及评分列表
export const getAccountingWorkshopStaffScorePage = async (params) => {
  return await request.get({ url: `/salary/accounting-workshop-staff-score/page`, params })
}

// 查询工资核算 --  车间工资核算 --车间员工考勤及评分详情
export const getAccountingWorkshopStaffScore = async (id: number) => {
  return await request.get({ url: `/salary/accounting-workshop-staff-score/get?id=` + id })
}

// 新增工资核算 --  车间工资核算 --车间员工考勤及评分
export const createAccountingWorkshopStaffScore = async (data: AccountingWorkshopStaffScoreVO) => {
  return await request.post({ url: `/salary/accounting-workshop-staff-score/create`, data })
}

// 修改工资核算 --  车间工资核算 --车间员工考勤及评分
export const updateAccountingWorkshopStaffScore = async (data: AccountingWorkshopStaffScoreVO) => {
  return await request.put({ url: `/salary/accounting-workshop-staff-score/update`, data })
}

// 删除工资核算 --  车间工资核算 --车间员工考勤及评分
export const deleteAccountingWorkshopStaffScore = async (data) => {
  return await request.delete({ url: `/salary/accounting-workshop-staff-score/deletes`,data})
}

// 导出工资核算 --  车间工资核算 --车间员工考勤及评分 Excel
export const exportAccountingWorkshopStaffScore = async (data) => {
  return await request.download({ url: `/salary/accounting-workshop-staff-score/export-excel`, data })
}

// // 查询配置中心-人员档案所有数据（名称查询）
// export const getStaffList = async (keyword) => {
//   return await request.get({ url: `/config/org-staff-archives/list-all-simple?keyword=${keyword}`})
// }

// 查询配置中心-人员档案所有数据（名称查询）
export const getStaffList = async (params) => {
  return await request.get({ url: `/config/org-staff-archives/page`,params})
}